home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1985 Winter
/
rerun-1985-winter.d64
/
perfect pitch
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
112 lines
4 rem pitch switch
5 rem ear training 1, c64 version
6 rem major scale
7 n=10
8 dimsl$(5)
9 sl$(1)="017037019063021154022227025177028214032094034075"
10 sl$(2)="010060011114012216013156015070017037019063020100"
11 sl$(3)="022227025177028214030141034075038126043052045198"
12 sl$(4)="027056030141034075036085040200045198051097054111"
13 sl$(5)="007163008147009159010060011114012216014107015070"
15 v=54296:a2=54284:s2=54285:h2=54280:l2=54279:w2=54283
16 sc=53281:bo=53280:co=54272:cr=53272
17 pokecr,23:pokea2,12:pokes2,240
19 pokesc,1:pokebo,6
20 print"[147] [208]itch [211]witch [146]"
21 print" [212]his program will help you to recognize";
22 print"pitch differences between notes of a":print"major scale."
23 print" [217]ou must answer";n;"right to finish the":print"game."
24 print" [201]f you need to hear a problem repeated,";
25 print"press the 'f1' key."
38 print" [208]ress any key."
40 getm$:ifm$=""then40
42 pokebo,7:r=0:w=0:print"[147][196]ifficulty [204]evel[146]"
43 print"1.-[203]eynote intervals on the same scale."
44 print"2.-[203]eynote intervals on varying scales."
45 print"3.-[214]arying intervals on varying scales."
47 print" [194]egin by selectintg 1,2,or 3."
50 getl$:ifl$=""then50
53 l=val(l$)
54 ifl>3orl<1then50
79 rem play scale
90 sn=int(rnd(1)*5+1)
100 pokebo,2:print"[147][200]ere is a major scale."
103 pokev,15:print""
105 for k=1to8
110 ph=val(mid$(sl$(sn),6*k-5,3))
111 pl=val(mid$(sl$(sn),6*k-2,3))
120 pokeh2,ph:pokel2,pl:pokew2,17:printtab(2*k+2)"[145][145][145][172][165]"
121 printtab(2*k+2)k
130 fori=1to200:nexti
140 pokew2,0
150 nextk:pokev,0
160 rem give problem
165 ifan$="[133]"then180
170 nn=int(rnd(1)*8+1)
171 n1=int(rnd(1)*8+1)
172 ifl<3thenn1=1
180 fh=val(mid$(sl$(sn),6*n1-5,3))
181 fl=val(mid$(sl$(sn),6*n1-2,3))
190 sh=val(mid$(sl$(sn),6*nn-5,3))
191 sl=val(mid$(sl$(sn),6*nn-2,3))
195 fori=1to500:nexti
196 ifl<3then200
197 print"[200]ere are two notes of the scale.":wm=0:goto205
199 ifl<3then200
200 print"[200]ere is the keynote followed by one of":print"the others.":wm=0
205 fori=1to500:nexti
209 pokev,15
210 pokeh2,fh:pokel2,fl:pokew2,17
213 print"":forx=1ton1:printtab(2*x+2)"[145]";:nextx
214 print"[172][165][146]":printtab(2*x)"";n1;"[146]"
220 fori=1to300:nexti
230 pokew2,0
240 fori=1to300:nexti
250 pokeh2,sh:pokel2,sl:pokew2,17
260 fori=1to300:nexti
270 pokew2,0:pokev,0
275 ifwm=1then610
280 print"[212]ype the number of the second note. "
281 print" "
290 getan$:ifan$=""then290
291 ifan$="[133]"then100
293 an=val(an$)
294 ifan=0then290
295 ifan=nnthen500
300 goto600
499 rem correct
500 pokebo,0:print"[195][207][210][210][197][195][212][146]":pokev,15:pokeh2,115:pokel2,88:pokew2,17
501 fori=1to80:nexti
502 pokew2,0:pokev,0
508 fori=1to1000:nexti
510 r=r+1
515 ifr=nthen800
520 ifl=1then100
530 goto90
599 rem wrong
600 pokebo,13:pokev,15:pokew2,33:forx=1to8
601 pokeh2,100-12*x:pokel2,100+12*x:fori=1to200:nexti:nextx
602 pokew2,0:pokev,0:wm=1
605 print"[212]he answer is...":goto205
610 print"":forx=1tonn:printtab(2*x+2)"[145]";:nextx
611 print"[172][165][146]":printtab(2*x)"";nn;"[146]"
613 print" [208]ress any key."
615 getm$:ifm$=""then610
620 w=w+1
630 ifl=1then100
640 goto90
799 rem tally score
800 pokebo,1:pokev,15:pokew2,17
801 print"[147] [217][193][200][207][207]![146]":forx=1to30:pokeh2,100+5*x:pokel2,50
802 fori=1to20:nexti
803 nextx
805 pokew2,0:pokev,0
806 print" [217]ou got";r;"right out of";r+w;"."
810 print"[208]ress '[193]' for another round."
820 print"[208]ress '[210]' to return to the beginning."
830 print"[208]ress '[197]' to end."
840 getm$:ifm$=""then840
850 ifm$="a"then42
853 ifm$="r"then19
856 print"[147]":pokecr,21:end